<!--{subtemplate common/header}-->
<script>
$(document).ready(function(){
	//ibk.annouce.init();
	$("#notice").annouce();
});
</script>
<div class='row'>
<div class='main-left hidden-xs' style="background:#ccc">
<div class='left-top'>
<!--{if $_G['user']['uid']==0}-->
<div id='guest'>
<div style=' width: 70%;position: relative;margin: auto;font-weight:100;padding:20px;'>
<div style=' margin: 0px auto; margin-top: 30px; float: left; color: #a0a0a0; '><span style="
   float: left; font-size: 30px; 
">Hi,</span><br/>游客
</div>
<img id='user-image' style='width: 50px;height: 50px;margin-top: 39px;' src="" class="img-thumbnail dropdown-toggle" data-toggle="dropdown" style='width:50px;height:50px;'/>
</div>
<div id='index-login'>
<form class="form-horizontal" role="form" method='post' action='index.php?mod=user&action=login' onsubmit="$('form')[0].action+='&refer='+encodeURIComponent(window.location.href)">
  <div class="form-group">
    <label for="username" class="col-sm-4 control-label">用户名</label>
    <div class="col-sm-7">
      <input type="username" class="form-control" name='username' id="username" placeholder="请输入用户名">
    </div>
  </div>
  <div class="form-group">
    <label for="password" class="col-sm-4 control-label">密码</label>
    <div class="col-sm-7">
      <input type="password" class="form-control" name='password' id="password" placeholder="请输入密码">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-3">
      <button type="submit" class="btn btn-default">登录</button>
    </div>
    <div class="col-sm-offset-2 col-sm-3">
      <button type="button" class="btn btn-default">注册</button>
    </div>
  </div>
</form>
</div>
</div>
<!--{else}-->
<div id="user-info">
<div id="user-name"><p style="font-size: 26px; line-height: 24px;">Hi,</p>$_G['username']
</div>
<img id='user-image' src="$userimg" onerror="this.onerror=null;this.src='../ucenter/images/noavatar_middle.gif'" role="menu">
<ul class="dropdown-menu" role="menu">
    <li><a href="#" id='home-btn-logout' data-toggle="modal" data-target="#modal-index-logout">退出</a></li>
    <li><a href="#">个人资料</a></li>
  </ul>
</div>
<div style='margin-top:40px;'>
<div class="btn-group-vertical btn-main-left" style='width:100%'>
<ul class="nav nav-pills nav-stacked">
  <li id='btn-index' class="active"><a href="#"><b></b>贝城主页</a></li>
  <li id='btn-box'><a href="#"><b></b>订阅盒子</a></li>
  <li id='btn-aboutme'><a href="#"><b></b>与我相关</a></li>
  <li id='btn-message'><a href="#"><b></b>聊天消息</a></li>
  <li id='btn-setting'><a href="#"><b></b>个人设置</a></li>
</ul>
</div>
</div>
<!--{/if}-->
</div>
<div class='left-bottom' style='color:#a0a0a0'>
<div class='bottom-logo'>
</div>
<p>意见反馈</p>
<p>关于我们</p>
</div>
</div>
<div class='main-right'>
<div class='main-center'>
	<div id="notice">
    <b></b>
	<ul>
	<!--{if empty($annouce)}-->
	<li>暂无新公告</li>
	<!--{else}-->
	<!--{loop $annouce $val}-->
    <li><a href="index.php?mod=misc&action=annouce&id=$val['id']">$val['subject']</a></li>
    <!--{/loop}-->
    <!--{/if}-->
    </ul>
    
    
	</div>
<ul class='main-icons'>
<li id='main-icon-square'>
<a href='index.php?mod=square'></a>
</li>
<li id='main-icon-news'>
<a href='index.php?mod=news'></a>
</li>
<li id='main-icon-school'>
<a href='index.php?mod=school'></a>
</li>
<li id='main-icon-market'>
<a href='index.php?mod=market'></a>
</li>
<li id='main-icon-share'>
<a href='index.php?mod=share'></a>
</li>
</ul>
<div class="main-sub">
<ul class="main-sub-icons">
<li><span>北科百科</span></li>
<li><span>校学生会</span></li>
<li><span>电视直播</span></li>
<li><span>其他</span></li>
</ul></div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="modal-index-logout" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">退出</h4>
      </div>
      <div class="modal-body">
        确认退出吗？
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary" onclick='window.location.href="index.php?mod=user&action=logout"'>确认</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!--{subtemplate common/footer}-->
